package com.mock.service.impl;

import com.mock.Dao.PersonDao;
import com.mock.Dao.impl.PersonDaoImpl;
import com.mock.entity.PageInfo;
import com.mock.entity.Person;
import com.mock.service.PersonService;

import java.sql.SQLException;
import java.util.List;

public class personServiceImpl implements PersonService {
    PersonDao personDao = new PersonDaoImpl();

    @Override
    public List<Person> getPersonList(PageInfo pageInfo) throws SQLException {
        List<Person> res = personDao.selectPersons(pageInfo.getIndex(),pageInfo.getPageSize());
        return res;
    }
}
